﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace _XNA__RunningDeath.GUI
{
    class CGUI_SelectMap:CDiaLogBox
    {
        Texture2D _texBackground;
        Texture2D _texBtnBack;
        Texture2D _texBtnStart;
        Texture2D _texBtnNext;
        Texture2D _texBtnPrev;
        public CGUI_SelectMap(ContentManager content, GameTime gameTime, SpriteBatch spriteBatch)
            : base (content, gameTime, spriteBatch)
        {
            if (this._content != null)
            {
                this._texBackground = this._content.Load<Texture2D>(@"GUI/bgSelectMap");
                this._texBtnBack = this._content.Load<Texture2D>(@"GUI/btnBack");
                this._texBG = this._content.Load<Texture2D>(@"GUI/guiBG");
                this._texBtnStart = this._content.Load<Texture2D>(@"GUI/btnStart");
                this._texBtnNext = this._content.Load<Texture2D>(@"GUI/btnNext");
                this._texBtnPrev = this._content.Load<Texture2D>(@"GUI/btnPrev");
                this._dstoado = this._content.Load<Dictionary<string, Rectangle>>(@"GUI/ztoadoXMLgui");
            }
        }
        public override void Draw(GameTime gameTime)
        {
            this._spriteBatch.Begin();
            this._spriteBatch.Draw(this._texBG, Vector2.Zero, Color.Gray);
            this._spriteBatch.Draw(this._texBackground, new Vector2(this._dstoado["bgSelectMap"].X, this._dstoado["bgSelectMap"].Y), Color.White);
            this._spriteBatch.Draw(this._texBtnBack, new Vector2(this._dstoado["btnBackSelectMap"].X, this._dstoado["btnBackSelectMap"].Y), Color.White);
            this._spriteBatch.Draw(this._texBtnNext, new Vector2(this._dstoado["btnNext"].X, this._dstoado["btnNext"].Y), Color.White);
            this._spriteBatch.Draw(this._texBtnStart, new Vector2(this._dstoado["btnStartSelectMap"].X, this._dstoado["btnStartSelectMap"].Y), Color.White);
            this._spriteBatch.Draw(this._texBtnPrev, new Vector2(this._dstoado["btnPrev"].X, this._dstoado["btnPrev"].Y), Color.White);
            this._spriteBatch.End();
        }
    }
}
